package com.ruandi.Test17;

public class Book {
    //属性
    private String id;
    private String name;
    private int price;

    //构造参数
    public Book() {
    }
    public Book(String id, String name, int price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    //行为
    public void showAll(){
        System.out.println("图书编号："+getId()+",书名："+getName()+",价格："+getPrice());
    }

    //get set

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
